#include <stdio.h>
#include <pthread.h>

void* func(void* arg)
{
	char* name = ((char*)arg);
	printf("执行的是%s\n",name);

	printf("aaaaaaaa\n");
	printf("bbbbbbbb\n");

	pthread_exit(0);
}


void* func1(void* agr)
{
	char* name = ((char*)agr);
	printf("执行的是%s\n",name);
	printf("cccccccc\n");
	printf("dddddddd\n");

	pthread_exit(0);
}

int main()
{
	pthread_t tid1, tid2;

	//创建线程
	pthread_create(&tid1, NULL, func, "thread1");
	pthread_create(&tid2, NULL, func1, "thread2");

	pthread_join(tid2, NULL);
	pthread_join(tid2, NULL);
	return 0;
}
